{include file="public/header" /}


<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.ds_express}</h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
    
    <form method="get" name="formSearch" id="formSearch">
        <div class="ds-search-form">
            <dl>
                <dt>{$Think.lang.express_name}</dt>
                <dd><input class="txt" name="express_name" id="express_name" value="{$Request.param.express_name}" type="text"></dd>
            </dl>
            <dl>
                <dt>{$Think.lang.express_letter}</dt>
                <dd>
                    <select name="express_letter" >
                        <option value="">{$Think.lang.ds_all}</option>
                        <?php foreach (range('A','Z') as $v){?>
                        <option {if $Request.param.express_letter eq $v}selected='selected'{/if} value="<?php echo $v;?>"><?php echo $v;?></option>
                        <?php }?>
                    </select>
                </dd>
            </dl>
            <div class="btn_group">
                 <a href="javascript:document.formSearch.submit();" class="btn " title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
                 <a class="btn" href="{:url('Express/index')}" title="{$Think.lang.ds_cancel_search}"><span>{$Think.lang.ds_cancel_search}</span></a>
            </div>
        </div>
    </form>
    


    <table class="ds-default-table">
        <thead>
            <tr>
                <th></th>
                <th>{$Think.lang.express_name}</th>
                <th>{$Think.lang.express_letter}</th>
                <th>{$Think.lang.express_url}</th>
                <th>{$Think.lang.express_order}</th>
                <th>{$Think.lang.ds_state}</th>
                <th>{$Think.lang.zt_express}</th>
                <th>{$Think.lang.ds_handle}</th>
            </tr>
        </thead>
        <tbody>
            {notempty  name="express_list"}
            {foreach name="express_list" item="v"}
            <tr>
                <td><input value="{$v.express_id}" class="checkitem" type="checkbox" name="del_express_id[]"></td>
                <td>{$v.express_name}</td>
                <td>{$v.express_letter}</td>
                <td>{$v.express_url}</td>
                <td class="align-center yes-onoff">
                    {if $v.express_order == 1}
                    <a href="JavaScript:void(0);" class=" enabled" ajax_branch='order' ds_type="inline_edit" fieldname="express_order" fieldid="{$v.express_id}" fieldvalue="1" title="{$Think.lang.ds_editable}"><img src="{$Think.ADMIN_SITE_ROOT}/images/treetable/transparent.gif"></a>
                    {else /}
                    <a href="JavaScript:void(0);" class=" disabled" ajax_branch='order' ds_type="inline_edit" fieldname="express_order" fieldid="{$v.express_id}" fieldvalue="0"  title="{$Think.lang.ds_editable}"><img src="{$Think.ADMIN_SITE_ROOT}/images/treetable/transparent.gif"></a>
                    {/if}</td>
                <td class="align-center yes-onoff">
                    {if $v.express_state == 0}
                    <a href="JavaScript:void(0);" class=" disabled" ajax_branch='state' ds_type="inline_edit" fieldname="express_state" fieldid="{$v.express_id}" fieldvalue="0" title="{$Think.lang.ds_editable}"><img src="{$Think.ADMIN_SITE_ROOT}/images/treetable/transparent.gif"></a>
                    {else /}
                    <a href="JavaScript:void(0);" class=" enabled" ajax_branch='state' ds_type="inline_edit" fieldname="express_state" fieldid="{$v.express_id}" fieldvalue="1"  title="{$Think.lang.ds_editable}"><img src="{$Think.ADMIN_SITE_ROOT}/images/treetable/transparent.gif"></a>
                    {/if}</td>
                <td class="align-center yes-onoff">
                    {if $v.express_zt_state == 0}
                    <a href="JavaScript:void(0);" class=" disabled" ajax_branch='express_zt_state' ds_type="inline_edit" fieldname="express_zt_state" fieldid="{$v.express_id}" fieldvalue="0" title="{$Think.lang.ds_editable}"><img src="{$Think.ADMIN_SITE_ROOT}/images/treetable/transparent.gif"></a>
                    {else /}
                    <a href="JavaScript:void(0);" class=" enabled" ajax_branch='express_zt_state' ds_type="inline_edit" fieldname="express_zt_state" fieldid="{$v.express_id}" fieldvalue="1"  title="{$Think.lang.ds_editable}"><img src="{$Think.ADMIN_SITE_ROOT}/images/treetable/transparent.gif"></a>
                    {/if}
                </td>
                <td>
                    <a href="javascript:dsLayerOpen('{:url('Express/edit',['express_id'=>$v.express_id])}','{$Think.lang.ds_edit}-{$v.express_name}')" class="dsui-btn-edit"><i class="iconfont"></i>{$Think.lang.ds_edit}</a>
                    <a href="javascript:dsLayerConfirm('{:url('Express/del',['express_id'=>$v.express_id])}','{$Think.lang.ds_ensure_del}')" class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.ds_del}</a>
                </td>
            </tr>
            {/foreach}
            {else /}
            <tr class="no_data">
                <td colspan="20">{$Think.lang.no_record}</td>
            </tr>
            {/notempty}
        </tbody>
        <tfoot>
            {notempty name="express_list"}
            <tr colspan="15" class="tfoot">
                <td><input type="checkbox" class="checkall" id="checkallBottom"></td>
                <td colspan="16">
                    <label for="checkallBottom">{$Think.lang.ds_select_all}</label>
                    &nbsp;&nbsp;<a href="JavaScript:void(0);" class="btn btn-small" onclick="submit_delete_batch()"><span>{$Think.lang.ds_del}</span></a>
                </td>
            </tr>
            {/notempty}
        </tfoot>
    </table>
    {$show_page|raw}
</div>

<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
<script type="text/javascript">
    function submit_delete(ids_str){
        _uri = ADMINSITEURL+"/Express/del.html?express_id=" + ids_str;
        dsLayerConfirm(_uri,'{$Think.lang.ds_ensure_del}');
    }
</script>